<template>
  <div class="yangsheng">
    <div class="" v-for="(item, index) in paList" :key="index">
      <div>
        <h2 class="yang_sheng">{{ item.title }}</h2>
        <div class="yang_wen">
          {{ item.page }}
        </div>
        <img :src="item.url" alt="" class="yang_img" />
        <div class="yang_wen">
          {{ item.page1 }}
        </div>
        <img :src="item.url1" alt="" class="yang_img" />
        <div class="yang_wen">
          {{ item.page2 }}
        </div>
        <img :src="item.url2" alt="" class="yang_img" />
        <div class="yang_wen">
          {{ item.page3 }}
        </div>
        <div class="yang_wen">
          {{ item.page4 }}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { reqyangsheng } from "../../api";
export default {
  data() {
    return {
      paList: [],
      id: "",
    };
  },
  async created() {
    console.log("1");
    this.id = this.$route.params.id;
    let id = this.id;
    const res = await reqyangsheng(id);
    this.paList = res.data;
  },
};
</script>

<style>
.yangsheng {
  width: 100%;
  height: 50px;
  text-align: center;
  line-height: 50px;
  background-color: skyblue;
}
.yang_wen {
  width: 90%;
  margin: 0 5%;
  font-size: 14px;
  text-align: left;
}
.yang_img {
  width: 90%;
  margin: 0 5%;
}
.yang_sheng {
  overflow: hidden; /*超出盒子宽度部分文字被隐藏*/
  text-overflow: ellipsis; /*当文本溢出包含元素时发生的事情 ellipsis*/
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 16px;
  margin: 0 7%;
}
.yang_container {
  overflow: hidden;
  background-color: #eee;
}
</style>
